package com.tc.gateway.device.remote;

import java.util.Collection;


import com.byq.mm.abstractx.cluster.server.executor.Executor;
import com.byq.mm.abstractx.device.Cluster;
import com.byq.mm.abstractx.device.Device;
import com.byq.mm.foundation.cluster.server.BasicClusterServer;
import com.tc.gateway.device.GeneralDevice;

abstract public class RemoteController<T extends GeneralDevice> {
	T device;

	public RemoteController(T device) {
		super();
		this.device = device;
	}

	public Device getRemote() {

		Device d = new Device();
		d.setName(device.getName());
		d.setId(device.getId());
		d.setType(device.getType());

		d.setSupportedClusters(getSupportedClusters());
		return d;

	}

	protected abstract Collection<Cluster> getSupportedClusters();

	public abstract Executor getExecutor(BasicClusterServer server);
}
